#include "common.h"

 bool gb_RandomSet = false;

 int generateRandom()
 {
 	if(gb_RandomSet == false)
 	{
 		srand(unsigned(time(0)));
 		gb_RandomSet = true;
 	}

 	return random() % 1000;
 }

int * generateRandomArray(int arrayLen)
{
	int * array = new int[arrayLen];
	int * p = array;
	for(int i = 0; i < arrayLen; i++)
	{
		int random = generateRandom();
		if(i%10 == 0)
			std::cout << std::endl <<"-------------------------------------------------" << std::endl;
		std::cout << random << "  ";
		*p++ = random;	
	}
		
	return array;

}
